<?php

class SimilarGenreModel extends CI_Model {
	function saveSimilarValue($userid, $usiaid, $genre, $value){
		$sql = "insert into similargenre (USERID, USIAPERUBAHANID, GENREID, SIMILARVALUE) values($userid, $usiaid, '$genre', $value)";
		$data = $this->db->query($sql);
		return $data;
	}
	
	function getSimilarGenre($userid, $usiaid){
		$this->db->select('GENREID');
		$this->db->where('USERID',$userid);
		$this->db->where('USIAPERUBAHANID',$usiaid);
		$this->db->from('similargenre');
		$data = $this->db->get();
		return $data;
	}
}


?>